function j_ajax(url,data,success,error) {
    $.ajax({
        url:url
        ,data:data
        ,method:"post"
        ,success:function (data) {
            if (typeof data == 'string') {
                var d = JSON.parse(data);
            }
            if (d.msg){
                if (typeof success == "function") {
                    success(d);
                }
            }else{
                error(d);
            }
        }
        ,error:function (err,a,b) {
            if (typeof error  == "function"){
                error(err,a,b);
            }
        }
    });
}